Platform Explorer / Nuxeo Platform 5.8

Contribution studio.extensions.template-module-demo--widgettypes

This contribution is part of XML component studio.extensions.template-module-demo inside nuxeo-template-rendering-samples-5.8.jar

Documentation

Widget types declared in studio

Extension Point

Extension point widgettypes of component WebLayoutManager.

Contributed Items

  • <widgetType name="path">
    
          <configuration>
    
            <title>Path</title>
    
            <description>
              The path widget displays a popup browser in the document
              hierarchy.
            </description>
    
            <supportedModes>
    
              <mode>edit</mode>
    
            </supportedModes>
    
            <fields>
    
              <list>false</list>
    
              <complex>false</complex>
    
              <supportedTypes>
    
                <type>string</type>
    
                <type>path</type>
    
              </supportedTypes>
    
              <defaultTypes>
    
                <type>path</type>
    
              </defaultTypes>
    
            </fields>
    
            <categories>
    
              <category>document</category>
    
              <category>studio</category>
    
            </categories>
    
            <!-- no properties to configure -->
    
          </configuration>
    
          <handler-class>
            org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
          </handler-class>
    
          <property name="template">/widgets/search_path_widget.xhtml</property>
    
        </widgetType>

    The path widget displays a popup browser in the document hierarchy.

  • <widgetType name="studio_header">
    
          <configuration>
    
            <title>Header</title>
    
            <description>
              The header widget just displays the widget label.
            </description>
    
            <supportedModes>
    
              <mode>edit</mode>
    
              <mode>view</mode>
    
            </supportedModes>
    
            <fields>
    
              <list>false</list>
    
              <complex>false</complex>
    
              <supportedTypes/>
    
              <defaultTypes/>
    
            </fields>
    
            <categories>
    
              <category>document</category>
    
              <category>studio</category>
    
            </categories>
    
            <properties>
    
              <layouts mode="any">
    
                <layout name="studio_header_widget_type_properties_any">
    
                  <rows>
    
                    <row>
    
                      <widget>styleClass</widget>
    
                    </row>
    
                    <row>
    
                      <widget>style</widget>
    
                    </row>
    
                  </rows>
    
                  <widget name="styleClass" type="text">
    
                    <labels>
    
                      <label mode="any">Style class</label>
    
                    </labels>
    
                    <fields>
    
                      <field>styleClass</field>
    
                    </fields>
    
                  </widget>
    
                  <widget name="style" type="text">
    
                    <labels>
    
                      <label mode="any">Style</label>
    
                    </labels>
    
                    <fields>
    
                      <field>style</field>
    
                    </fields>
    
                  </widget>
    
                </layout>
    
              </layouts>
    
            </properties>
    
          </configuration>
    
          <handler-class>
            org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
          </handler-class>
    
          <property name="template">
            /widgets/studio_header_widget.xhtml
          </property>
    
        </widgetType>

    The header widget just displays the widget label.

  • <widgetType name="chainedDirectory">
    
          <configuration>
    
            <title>Chained Vocabulary</title>
    
            <supportedModes>
    
              <mode>view</mode>
    
              <mode>edit</mode>
    
            </supportedModes>
    
            <fields>
    
              <list>false</list>
    
              <complex>false</complex>
    
              <supportedTypes>
    
                <type>string</type>
    
              </supportedTypes>
    
            </fields>
    
            <categories>
    
              <category>document</category>
    
              <category>studio</category>
    
            </categories>
    
            <properties>
    
              <layouts mode="any">
    
                <layout name="chainedDirectory_widget_type_properties_any">
    
                  <rows>
    
                    <row>
    
                      <widget>childDirectory</widget>
    
                    </row>
    
                    <row>
    
                      <widget>localize</widget>
    
                    </row>
    
                  </rows>
    
                  <widget name="childDirectory" type="selectOneResource">
    
                    <labels>
    
                      <label mode="any">Vocabulary</label>
    
                    </labels>
    
                    <helpLabels>
    
                      <label mode="any">
                        Select the child or hierarchical directory
                        mapped.
                      </label>
    
                    </helpLabels>
    
                    <fields>
    
                      <field>childDirectory</field>
    
                    </fields>
    
                    <properties mode="any">
    
                      <property name="resourceName">child_vocabularies</property>
    
                    </properties>
    
                    <properties widgetMode="edit">
    
                      <property name="required">true</property>
    
                    </properties>
    
                  </widget>
    
                  <widget name="localize" type="checkbox">
    
                    <labels>
    
                      <label mode="any">Localize</label>
    
                    </labels>
    
                    <helpLabels>
    
                      <label mode="any">If true, labels will be localized.</label>
    
                    </helpLabels>
    
                    <fields>
    
                      <field>localize</field>
    
                    </fields>
    
                  </widget>
    
                </layout>
    
              </layouts>
    
              <layouts mode="edit">
    
                <layout name="chainedDirectory_widget_type_properties_edit">
    
                  <rows>
    
                    <row>
    
                      <widget>required</widget>
    
                    </row>
    
                    <row>
    
                      <widget>on2rows</widget>
    
                    </row>
    
                  </rows>
    
                  <widget name="required" type="checkbox">
    
                    <labels>
    
                      <label mode="any">Required</label>
    
                    </labels>
    
                    <fields>
    
                      <field>required</field>
    
                    </fields>
    
                  </widget>
    
                  <widget name="on2rows" type="checkbox">
    
                    <labels>
    
                      <label mode="any">On 2 rows</label>
    
                    </labels>
    
                    <helpLabels>
    
                      <label mode="any">
                        If true, display the selectors on two rows.
                        Defaults to
                        false.
                      </label>
    
                    </helpLabels>
    
                    <fields>
    
                      <field>on2rows</field>
    
                    </fields>
    
                  </widget>
    
                </layout>
    
              </layouts>
    
            </properties>
    
          </configuration>
    
          <handler-class>
            org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
          </handler-class>
    
          <property name="template">
            /widgets/chain_monoselect_2levels_widget.xhtml
          </property>
    
        </widgetType>
  • <widgetType name="multiChainedDirectory">
    
          <configuration>
    
            <title>Multiple chained Vocabulary</title>
    
            <supportedModes>
    
              <mode>view</mode>
    
              <mode>edit</mode>
    
            </supportedModes>
    
            <fields>
    
              <list>true</list>
    
              <complex>false</complex>
    
              <supportedTypes>
    
                <type>string</type>
    
              </supportedTypes>
    
            </fields>
    
            <categories>
    
              <category>document</category>
    
              <category>studio</category>
    
            </categories>
    
            <properties>
    
              <layouts mode="any">
    
                <layout name="multiChainedDirectory_widget_type_properties_any">
    
                  <rows>
    
                    <row>
    
                      <widget>childDirectory</widget>
    
                    </row>
    
                    <row>
    
                      <widget>localize</widget>
    
                    </row>
    
                  </rows>
    
                  <widget name="childDirectory" type="selectOneResource">
    
                    <labels>
    
                      <label mode="any">Vocabulary</label>
    
                    </labels>
    
                    <helpLabels>
    
                      <label mode="any">
                        Select the child or hierarchical directory
                        mapped.
                      </label>
    
                    </helpLabels>
    
                    <fields>
    
                      <field>childDirectory</field>
    
                    </fields>
    
                    <properties mode="any">
    
                      <property name="resourceName">child_vocabularies</property>
    
                    </properties>
    
                    <properties widgetMode="edit">
    
                      <property name="required">true</property>
    
                    </properties>
    
                  </widget>
    
                  <widget name="localize" type="checkbox">
    
                    <labels>
    
                      <label mode="any">Localize</label>
    
                    </labels>
    
                    <helpLabels>
    
                      <label mode="any">If true, labels will be localized.</label>
    
                    </helpLabels>
    
                    <fields>
    
                      <field>localize</field>
    
                    </fields>
    
                  </widget>
    
                </layout>
    
              </layouts>
    
              <layouts mode="edit">
    
                <layout name="multiChainedDirectory_widget_type_properties_edit">
    
                  <rows>
    
                    <row>
    
                      <widget>required</widget>
    
                    </row>
    
                    <row>
    
                      <widget>on2rows</widget>
    
                    </row>
    
                  </rows>
    
                  <widget name="required" type="checkbox">
    
                    <labels>
    
                      <label mode="any">Required</label>
    
                    </labels>
    
                    <fields>
    
                      <field>required</field>
    
                    </fields>
    
                  </widget>
    
                  <widget name="on2rows" type="checkbox">
    
                    <labels>
    
                      <label mode="any">On 2 rows</label>
    
                    </labels>
    
                    <helpLabels>
    
                      <label mode="any">
                        If true, display the selectors on two rows.
                        Defaults to
                        false.
                      </label>
    
                    </helpLabels>
    
                    <fields>
    
                      <field>on2rows</field>
    
                    </fields>
    
                  </widget>
    
                </layout>
    
              </layouts>
    
            </properties>
    
          </configuration>
    
          <handler-class>
            org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
          </handler-class>
    
          <property name="template">
            /widgets/chain_multiselect_2levels_widget.xhtml
          </property>
    
        </widgetType>
  • <widgetType name="filesList">
    
          <configuration>
    
            <title>Files</title>
    
            <description>
    
              <p>
                The Files displays an editable list of files, using javascript to
                keep the uploaded file path when adding several files in a row.
              </p>
    
              <p>Items are defined using sub wigdets configuration.</p>
    
              <p>
                This is actually a template widget type whose template uses a
                &lt;nxu:inputList /&gt; tag in edit or create mode, and a table
                iterating over items in other modes.
              </p>
    
            </description>
    
            <categories>
    
              <category>document</category>
    
              <category>studio</category>
    
            </categories>
    
            <supportedModes>
    
              <mode>edit</mode>
    
              <mode>view</mode>
    
            </supportedModes>
    
            <acceptingSubWidgets>true</acceptingSubWidgets>
    
            <fields>
    
              <list>true</list>
    
              <complex>false</complex>
    
              <supportedTypes>
    
                <type>blob</type>
    
              </supportedTypes>
    
              <defaultTypes>
    
                <type>blob</type>
    
              </defaultTypes>
    
            </fields>
    
            <properties>
    
              <layouts mode="edit">
    
                <layout name="list_widget_type_properties_edit">
    
                  <rows>
    
                    <row>
    
                      <widget>required</widget>
    
                    </row>
    
                    <row>
    
                      <widget>diff</widget>
    
                    </row>
    
                  </rows>
    
                  <widget name="required" type="checkbox">
    
                    <labels>
    
                      <label mode="any">Required</label>
    
                    </labels>
    
                    <fields>
    
                      <field>required</field>
    
                    </fields>
    
                  </widget>
    
                  <widget name="diff" type="checkbox">
    
                    <labels>
    
                      <label mode="any">Diff</label>
    
                    </labels>
    
                    <fields>
    
                      <field>diff</field>
    
                    </fields>
    
                  </widget>
    
                </layout>
    
              </layouts>
    
            </properties>
    
          </configuration>
    
          <handler-class>
            org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
          </handler-class>
    
          <property name="template">/widgets/files_list_widget_template.xhtml
          </property>
    
        </widgetType>

XML Source

<extension point="widgettypes" target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager">


    <documentation>Widget types declared in studio</documentation>


    <widgetType name="path">

      <configuration>

        <title>Path</title>

        <description>
          The path widget displays a popup browser in the document
          hierarchy.
        </description>

        <supportedModes>

          <mode>edit</mode>

        </supportedModes>

        <fields>

          <list>false</list>

          <complex>false</complex>

          <supportedTypes>

            <type>string</type>

            <type>path</type>

          </supportedTypes>

          <defaultTypes>

            <type>path</type>

          </defaultTypes>

        </fields>

        <categories>

          <category>document</category>

          <category>studio</category>

        </categories>

        <!-- no properties to configure -->

      </configuration>

      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>

      <property name="template">/widgets/search_path_widget.xhtml</property>

    </widgetType>


    <widgetType name="studio_header">

      <configuration>

        <title>Header</title>

        <description>
          The header widget just displays the widget label.
        </description>

        <supportedModes>

          <mode>edit</mode>

          <mode>view</mode>

        </supportedModes>

        <fields>

          <list>false</list>

          <complex>false</complex>

          <supportedTypes/>

          <defaultTypes/>

        </fields>

        <categories>

          <category>document</category>

          <category>studio</category>

        </categories>

        <properties>

          <layouts mode="any">

            <layout name="studio_header_widget_type_properties_any">

              <rows>

                <row>

                  <widget>styleClass</widget>

                </row>

                <row>

                  <widget>style</widget>

                </row>

              </rows>

              <widget name="styleClass" type="text">

                <labels>

                  <label mode="any">Style class</label>

                </labels>

                <fields>

                  <field>styleClass</field>

                </fields>

              </widget>

              <widget name="style" type="text">

                <labels>

                  <label mode="any">Style</label>

                </labels>

                <fields>

                  <field>style</field>

                </fields>

              </widget>

            </layout>

          </layouts>

        </properties>

      </configuration>

      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>

      <property name="template">
        /widgets/studio_header_widget.xhtml
      </property>

    </widgetType>


    <widgetType name="chainedDirectory">

      <configuration>

        <title>Chained Vocabulary</title>

        <supportedModes>

          <mode>view</mode>

          <mode>edit</mode>

        </supportedModes>

        <fields>

          <list>false</list>

          <complex>false</complex>

          <supportedTypes>

            <type>string</type>

          </supportedTypes>

        </fields>

        <categories>

          <category>document</category>

          <category>studio</category>

        </categories>

        <properties>

          <layouts mode="any">

            <layout name="chainedDirectory_widget_type_properties_any">

              <rows>

                <row>

                  <widget>childDirectory</widget>

                </row>

                <row>

                  <widget>localize</widget>

                </row>

              </rows>

              <widget name="childDirectory" type="selectOneResource">

                <labels>

                  <label mode="any">Vocabulary</label>

                </labels>

                <helpLabels>

                  <label mode="any">
                    Select the child or hierarchical directory
                    mapped.
                  </label>

                </helpLabels>

                <fields>

                  <field>childDirectory</field>

                </fields>

                <properties mode="any">

                  <property name="resourceName">child_vocabularies</property>

                </properties>

                <properties widgetMode="edit">

                  <property name="required">true</property>

                </properties>

              </widget>

              <widget name="localize" type="checkbox">

                <labels>

                  <label mode="any">Localize</label>

                </labels>

                <helpLabels>

                  <label mode="any">If true, labels will be localized.</label>

                </helpLabels>

                <fields>

                  <field>localize</field>

                </fields>

              </widget>

            </layout>

          </layouts>

          <layouts mode="edit">

            <layout name="chainedDirectory_widget_type_properties_edit">

              <rows>

                <row>

                  <widget>required</widget>

                </row>

                <row>

                  <widget>on2rows</widget>

                </row>

              </rows>

              <widget name="required" type="checkbox">

                <labels>

                  <label mode="any">Required</label>

                </labels>

                <fields>

                  <field>required</field>

                </fields>

              </widget>

              <widget name="on2rows" type="checkbox">

                <labels>

                  <label mode="any">On 2 rows</label>

                </labels>

                <helpLabels>

                  <label mode="any">
                    If true, display the selectors on two rows.
                    Defaults to
                    false.
                  </label>

                </helpLabels>

                <fields>

                  <field>on2rows</field>

                </fields>

              </widget>

            </layout>

          </layouts>

        </properties>

      </configuration>

      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>

      <property name="template">
        /widgets/chain_monoselect_2levels_widget.xhtml
      </property>

    </widgetType>


    <widgetType name="multiChainedDirectory">

      <configuration>

        <title>Multiple chained Vocabulary</title>

        <supportedModes>

          <mode>view</mode>

          <mode>edit</mode>

        </supportedModes>

        <fields>

          <list>true</list>

          <complex>false</complex>

          <supportedTypes>

            <type>string</type>

          </supportedTypes>

        </fields>

        <categories>

          <category>document</category>

          <category>studio</category>

        </categories>

        <properties>

          <layouts mode="any">

            <layout name="multiChainedDirectory_widget_type_properties_any">

              <rows>

                <row>

                  <widget>childDirectory</widget>

                </row>

                <row>

                  <widget>localize</widget>

                </row>

              </rows>

              <widget name="childDirectory" type="selectOneResource">

                <labels>

                  <label mode="any">Vocabulary</label>

                </labels>

                <helpLabels>

                  <label mode="any">
                    Select the child or hierarchical directory
                    mapped.
                  </label>

                </helpLabels>

                <fields>

                  <field>childDirectory</field>

                </fields>

                <properties mode="any">

                  <property name="resourceName">child_vocabularies</property>

                </properties>

                <properties widgetMode="edit">

                  <property name="required">true</property>

                </properties>

              </widget>

              <widget name="localize" type="checkbox">

                <labels>

                  <label mode="any">Localize</label>

                </labels>

                <helpLabels>

                  <label mode="any">If true, labels will be localized.</label>

                </helpLabels>

                <fields>

                  <field>localize</field>

                </fields>

              </widget>

            </layout>

          </layouts>

          <layouts mode="edit">

            <layout name="multiChainedDirectory_widget_type_properties_edit">

              <rows>

                <row>

                  <widget>required</widget>

                </row>

                <row>

                  <widget>on2rows</widget>

                </row>

              </rows>

              <widget name="required" type="checkbox">

                <labels>

                  <label mode="any">Required</label>

                </labels>

                <fields>

                  <field>required</field>

                </fields>

              </widget>

              <widget name="on2rows" type="checkbox">

                <labels>

                  <label mode="any">On 2 rows</label>

                </labels>

                <helpLabels>

                  <label mode="any">
                    If true, display the selectors on two rows.
                    Defaults to
                    false.
                  </label>

                </helpLabels>

                <fields>

                  <field>on2rows</field>

                </fields>

              </widget>

            </layout>

          </layouts>

        </properties>

      </configuration>

      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>

      <property name="template">
        /widgets/chain_multiselect_2levels_widget.xhtml
      </property>

    </widgetType>


    <widgetType name="filesList">

      <configuration>

        <title>Files</title>

        <description>

          <p>
            The Files displays an editable list of files, using javascript to
            keep the uploaded file path when adding several files in a row.
          </p>

          <p>Items are defined using sub wigdets configuration.</p>

          <p>
            This is actually a template widget type whose template uses a
            &lt;nxu:inputList /&gt; tag in edit or create mode, and a table
            iterating over items in other modes.
          </p>

        </description>

        <categories>

          <category>document</category>

          <category>studio</category>

        </categories>

        <supportedModes>

          <mode>edit</mode>

          <mode>view</mode>

        </supportedModes>

        <acceptingSubWidgets>true</acceptingSubWidgets>

        <fields>

          <list>true</list>

          <complex>false</complex>

          <supportedTypes>

            <type>blob</type>

          </supportedTypes>

          <defaultTypes>

            <type>blob</type>

          </defaultTypes>

        </fields>

        <properties>

          <layouts mode="edit">

            <layout name="list_widget_type_properties_edit">

              <rows>

                <row>

                  <widget>required</widget>

                </row>

                <row>

                  <widget>diff</widget>

                </row>

              </rows>

              <widget name="required" type="checkbox">

                <labels>

                  <label mode="any">Required</label>

                </labels>

                <fields>

                  <field>required</field>

                </fields>

              </widget>

              <widget name="diff" type="checkbox">

                <labels>

                  <label mode="any">Diff</label>

                </labels>

                <fields>

                  <field>diff</field>

                </fields>

              </widget>

            </layout>

          </layouts>

        </properties>

      </configuration>

      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>

      <property name="template">/widgets/files_list_widget_template.xhtml
      </property>

    </widgetType>


  </extension>